package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Phone string `gorm:"type:char(11)" json:"phone"`
}

func (x *User) Create() error {
	return DB.Debug().Create(&x).Error
}
func (x *User) GetUser(phone string) error {
	return DB.Debug().Where("phone = ?", phone).Find(&x).Error
}
